package com.ssm.tsj.controller;

import com.ssm.common.pojo.TBodyTest;
import com.ssm.common.pojo.TBodyType;
import com.ssm.common.pojo.TMember;
import com.ssm.tsj.service.PhysicalAssessmentService;
import com.ssm.tsj.vo.TMemberVo;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@RestController
@CrossOrigin
public class PhysicalAssessmentController {

    @Resource
    private PhysicalAssessmentService physicalAssessmentService;

    @ResponseBody
    @RequestMapping("/PhysicalAssessmentQueryTmQuery.action")
    public List<TMemberVo> PhysicalAssessmentQuery(String name) throws Exception {

        System.out.println(name);
        return this.physicalAssessmentService.tmquery(name);
    }

    @ResponseBody
    @RequestMapping("/bodyQuery.action")
    public List<TBodyTest> bodyQuery() throws Exception {


        return this.physicalAssessmentService.bodyQuery();
    }

    @ResponseBody
    @RequestMapping("/mquery.action")
    public TMember fff(String sfz) throws Exception {


        return this.physicalAssessmentService.mQuery(sfz);
    }

    @ResponseBody
    @RequestMapping("/saveBodyType.action")
    public void ss(@RequestBody  TBodyType tbody) throws Exception {
        this.physicalAssessmentService.saveType(tbody);

    }

}
